package com.ycsd.invest.order.business.eventplugin;

import kd.bos.bec.api.IEventServicePlugin;
import kd.bos.bec.model.KDBizEvent;

import java.util.List;
import java.util.Map;

/**
 * @Descrіption:业务事件中心
 * 目前提供了2种方式：
 * 苍穹操作事件：定义了苍穹实体上的操作，执行此操作时会触发事件；
 * 自定义事件：定义了http api，执行接口时会触发事件。
 * @Author: yn
 * @Date: 2025/6/20 9:41
 */
public class TestStudyEvent implements IEventServicePlugin {
    @Override
    public Object handleEvent(KDBizEvent evt) {
        Map<String, String> stringStringMap = this.buildBillUrl(evt);
        Object o = this.compensateEvent(evt);
        Map<String, List<Long>> stringListMap = this.calculateUserIds(evt);
        String source = evt.getSource();
        System.out.println(source);
        return IEventServicePlugin.super.handleEvent(evt);
    }

    @Override
    public Object compensateEvent(KDBizEvent evt) {
        return IEventServicePlugin.super.compensateEvent(evt);
    }

    @Override
    public Map<String, List<Long>> calculateUserIds(KDBizEvent evt) {
        return IEventServicePlugin.super.calculateUserIds(evt);
    }

    @Override
    public Map<String, String> buildBillUrl(KDBizEvent evt) {
        return IEventServicePlugin.super.buildBillUrl(evt);
    }
}
